package com.vvlive.caibao.smartcity.utils;

/**
 * Created by lenovo on 2015/7/2.
 * string数字与字符串互化
 */
public class AddFunctionUtils {

    /**
     * 字符串转数组
     *
     * @param str 字符
     * @param f   分隔符
     */
    public static String[] getStrs(String str, String f) {
        return str.split(f);
    }

    /**
     * 数组转字符
     *
     * @param strs 数字
     * @param f    分隔符
     */
    public static String getStr(String[] strs, String f) {
        StringBuffer stringbf = new StringBuffer();
        String str;
        for (int i = 0; i < strs.length; i++) {
            stringbf.append(strs[i] + ",");
        }
        return stringbf.toString();
    }


}
